renderborder: Remove some unused API
authorTimm Bäder <mail@baedert.org>
Sat, 7 Jul 2018 12:34:18 +0000 (14:34 +0200)
committerTimm Bäder <mail@baedert.org>
Sun, 8 Jul 2018 07:41:15 +0000 (09:41 +0200)
gtk/gtkrenderborder.c
gtk/gtkrenderborderprivate.h

index be5993698a761ace1228a2d4194f7448e2a39c7d..f8e81253eae42eca2b120ec794da9b6a70f03301 100644 (file)
@@ -856,18 +856,6 @@ snapshot_border (GtkSnapshot    *snapshot,
   snapshot_frame_fill (snapshot, border_box, border_width, colors, hidden_side);
 }
 
-gboolean
-gtk_css_style_render_has_border (GtkCssStyle *style)
-{
-  if (_gtk_css_image_value_get_image (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_IMAGE_SOURCE)))
-    return TRUE;
-
-  return _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_TOP_WIDTH), 100) > 0
-      || _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_RIGHT_WIDTH), 100) > 0
-      || _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_BOTTOM_WIDTH), 100) > 0
-      || _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_LEFT_WIDTH), 100) > 0;
-}
-
 void
 gtk_css_style_render_border (GtkCssStyle *style,
                              cairo_t     *cr,
@@ -982,25 +970,6 @@ gtk_css_style_snapshot_border (GtkCssStyle *style,
     }
 }
 
-gboolean
-gtk_css_style_render_border_get_clip (GtkCssStyle  *style,
-                                      gdouble       x,
-                                      gdouble       y,
-                                      gdouble       width,
-                                      gdouble       height,
-                                      GdkRectangle *out_clip)
-{
-  if (!gtk_css_style_render_has_border (style))
-    return FALSE;
-
-  out_clip->x = floor (x);
-  out_clip->y = floor (y);
-  out_clip->width = ceil (x + width) - out_clip->x;
-  out_clip->height = ceil (y + height) - out_clip->y;
-
-  return TRUE;
-}
-
 gboolean
 gtk_css_style_render_has_outline (GtkCssStyle *style)
 {
@@ -1109,26 +1078,3 @@ gtk_css_style_snapshot_outline (GtkCssStyle *style,
       snapshot_border (snapshot, &border_box, border_width, colors, border_style);
     }
 }
-
-gboolean
-gtk_css_style_render_outline_get_clip (GtkCssStyle  *style,
-                                       gdouble       x,
-                                       gdouble       y,
-                                       gdouble       width,
-                                       gdouble       height,
-                                       GdkRectangle *out_clip)
-{
-  cairo_rectangle_t rect;
-
-  if (!gtk_css_style_render_has_outline (style))
-    return FALSE;
-
-  compute_outline_rect (style, x, y, width, height, &rect);
-
-  out_clip->x = floor (rect.x);
-  out_clip->y = floor (rect.y);
-  out_clip->width = ceil (rect.x + rect.width) - out_clip->x;
-  out_clip->height = ceil (rect.y + rect.height) - out_clip->y;
-
-  return TRUE;
-}
index b9f94cf37cb1da50968b8b1eda9747378ffad135..c0bed708541ba8d078cd094d1945f829b664212f 100644 (file)
 
 G_BEGIN_DECLS
 
-gboolean        gtk_css_style_render_has_border         (GtkCssStyle            *style);
 void            gtk_css_style_render_border             (GtkCssStyle            *style,
                                                          cairo_t                *cr,
                                                          gdouble                 x,
                                                          gdouble                 y,
                                                          gdouble                 width,
                                                          gdouble                 height);
-gboolean        gtk_css_style_render_border_get_clip    (GtkCssStyle            *style,
-                                                         gdouble                 x,
-                                                         gdouble                 y,
-                                                         gdouble                 width,
-                                                         gdouble                 height,
-                                                         GdkRectangle           *out_clip) G_GNUC_WARN_UNUSED_RESULT;
 void            gtk_css_style_snapshot_border           (GtkCssStyle            *style,
                                                          GtkSnapshot            *snapshot,
                                                          gdouble                 width,
@@ -58,13 +51,6 @@ void            gtk_css_style_snapshot_outline          (GtkCssStyle
                                                          GtkSnapshot            *snapshot,
                                                          gdouble                 width,
                                                          gdouble                 height);
-gboolean        gtk_css_style_render_outline_get_clip   (GtkCssStyle            *style,
-                                                         gdouble                 x,
-                                                         gdouble                 y,
-                                                         gdouble                 width,
-                                                         gdouble                 height,
-                                                         GdkRectangle           *out_clip) G_GNUC_WARN_UNUSED_RESULT;
-
 
 G_END_DECLS